
//
//  BassTableViewController.swift
//  Weibo
//
//  Created by huangjunyang on 15/10/1.
//  Copyright © 2015年 hjy. All rights reserved.
//

import UIKit

class BassTableViewController: UITableViewController, VisitorViewDelegate {

    var recordLogin = false
    var visitorLogin: VisitorView?

    override func loadView() {
        
        recordLogin ? super.loadView() : self.setRecordLoginView()
        
    }
    
    private func setRecordLoginView() {
        visitorLogin = VisitorView()
        
        //设置代理
        visitorLogin?.delegate = self
        
        view = visitorLogin
        
        navigationItem.leftBarButtonItem = UIBarButtonItem(title: "注册", style: UIBarButtonItemStyle.Plain, target: self, action:"visitorViewWillregister" )
        
          navigationItem.rightBarButtonItem = UIBarButtonItem(title: "登陆", style: UIBarButtonItemStyle.Plain, target: self, action:"visitorViewWillLogin" )
        
    }
    
    
    
    
    
    
    func visitorViewWillregister () {
        
        print("注册")
        
    }
    
    func visitorViewWillLogin () {
        
        print("登陆")
    }

    }

